package com.scoressystem.service.impl;

import com.scoressystem.mapper.SubjectsMapper;
import com.scoressystem.pojo.Student;
import com.scoressystem.pojo.Subjects;
import com.scoressystem.service.SubjectsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;
import java.util.Map;

@Service
public class SubjectsServiceImpl implements SubjectsService {

    @Resource
    private SubjectsMapper subjectsMapper;

    @Override
    public List<Subjects> selectAllSubjectsByPage(Map<String, Object> map) {
        return subjectsMapper.selectAllSubjectsByPage(map);
    }

    @Override
    public long selectAllSubjectsCount(Map<String, Object> map) {
        return subjectsMapper.selectAllSubjectsCount(map);
    }

    @Override
    public int addSubject(Subjects Subject) {
        return subjectsMapper.addSubject(Subject);
    }

    @Override
    public int deleteSubjectById(Integer SubjectNo) {
        return subjectsMapper.deleteSubjectById(SubjectNo);
    }

    @Override
    public int updateSubject(Subjects Subject) {
        return subjectsMapper.updateSubject(Subject);
    }

    @Override
    public Subjects getSubjectsByName(String SubjectName) {
        return subjectsMapper.getSubjectsByName(SubjectName);
    }

    @Override
    public Subjects getSubjectById(Integer SubjectNo) {
        return subjectsMapper.getSubjectById(SubjectNo);
    }

    @Override
    public List<Subjects> getAllSubjects() {
        return subjectsMapper.getAllSubjects();
    }

}
